import request from '@/utils/request'

export function OrdersSyncState(id, args) {
  return request({
    url: `/orders/api/orders_api_sync_state/${id || ''}${args && ('?' + args) || ''}`,
    method: 'get'
  })
}

export function OrdersSyncOrder(id, args) {
  return request({
    url: `/orders/api/orders_api_sync_order/${id || ''}${args && ('?' + args) || ''}`,
    method: 'get'
  })
}

export function OrdersGetPayment(id, args) {
  return request({
    url: `/orders/api/orders_api_get_payment/${id || ''}${args && ('?' + args) || ''}`,
    method: 'get'
  })
}

export function OrdersGetStatics(id, args) {
  return request({
    url: `/orders/api/orders_api_statics/${id || ''}${args && ('?' + args) || ''}`,
    method: 'get'
  })
}

export function OrdersGetWebOrderStatics(id, args) {
  return request({
    url: `/orders/api/orders_api_staticsbywebsite/${id || ''}${args && ('?' + args) || ''}`,
    timeout: 100000,
    method: 'get'
  })
}

export function SetPsLabel1(data) {
  return request({
    url: '/orders/api/set_ps_label1/',
    headers: { 'content-type': 'application/json' },
    method: 'post',
    data: data
  })
}

export function GetPsLabel1(data) {
  return request({
    url: '/orders/api/get_ps_label1/',
    headers: { 'content-type': 'application/json' },
    method: 'post',
    data: data
  })
}

export function DisputeOrders(data) {
  return request({
    url: '/orders/api/orders_api_dispute_orders/',
    headers: { 'content-type': 'application/json' },
    method: 'post',
    data: data
  })
}

export function GetPaymentStatus(data) {
  return request({
    url: '/orders/api/orders_get_payment_status/',
    headers: { 'content-type': 'application/json' },
    method: 'post',
    data: data
  })
}

